{% extends "PopshouseAdminBundle::layout.html.twig" %}

{% block js %}
admin('link','inline','{{ path('admin_links_delete_dummy') }}');
$("#tabs").tabs();
{% endblock %}

{% block title %}
Nieuws &amp; Promotionele berichten
{% endblock %}
{% block content %}
<div class="left side">
    {% include "PopshouseAdminBundle:Link:menu.html.twig"  %}
</div>
<div class="left content" style="width:670px">

     <h2>Links</h2>
     {% if app.session.hasFlash('notice') %}
        <div class="message message-green">
            {{ app.session.flash('notice') }}
            <span class="close"><img src="{{ asset('images/layout/admin/icon/close_green.png') }}" alt="sluit" /></span>
        </div>
    {% endif %}
      <p><a href="{{ path('admin_links_new') }}" class="action"><span>+ Link toevoegen</span></a></p>
     
     <div id="tabs">
	    <ul>
	        <li><a href="#tabs-nl">Nederlands</a></li>
	        <li><a href="#tabs-fr">Frans</a></li>
	        <li><a href="#tabs-en">Engels</a></li>
	        <li><a href="#tabs-de">Duits</a></li>
	    </ul>
	    
	    {% for lang, group in links %}
	    <div id="tabs-{{ lang }}">
            <ol class="nieuws links">
             {% for link in group %}
            
            <li id="link_{{ link.id }}" style="background-color: {{ cycle(['#e4edf5', '#fff'], loop.index) }};">
           
              <a href="{{ path('admin_links_edit',{'id':link.id}) }}"><img src="{{ asset('images/photo/links/'~link.id~'.jpg') }}" />
          {{ link.title }}
          </a>
            <div id="tools" style="display:none;">
               <a class="noborder" id="delete" entryid="{{ link.id }}" href="{{ path('admin_links_delete',{'id':link.id}) }}"><img src="{{ asset('images/layout/icons/delete.png') }}" class="clickable" /></a>
            </div>
                 <div id="dialog_{{ link.id }}" style="display:none;" title="Bevestig verwijderen?">
        
                    Weet je zeker dat je link "{{ link.title }}" wil verwijderen?
        
                </div>
            </li>
            
            {% endfor %}
            </ol>
        </div>
	    {% endfor %}
	   

	</div>



 
</div>
{% endblock %}